package com.ys.homework;

/**
 * 描述: TODO
 *
 * @author CodeYang
 * @version 2020/12/16 0:25
 */
public class Athletes  extends  Person{
    /**
     * 运动项目
     */
    private String item;
    /**
     * 最好成绩
     */
    private String bestScore;

    public Athletes() {
    }

    public Athletes(String item, String bestScore) {
        this.item = item;
        this.bestScore = bestScore;
    }

    public Athletes(String name, int age, String sex, String item, String bestScore) {
        super(name, age, sex);
        this.item = item;
        this.bestScore = bestScore;
    }

    @Override
    public void showInfo() {
        /**
         *  this 先在本类中找,找不到再去父类
         */
        System.out.println("大家好,我是:"+this.name);
        System.out.println("今年:"+this.age);
        System.out.println("我擅长的项目是:"+this.item);
        System.out.println("历史最好的成绩是:"+this.bestScore);
    }

    public String getItem() {
        return item;
    }

    public void setItem(String item) {
        this.item = item;
    }

    public String getBestScore() {
        return bestScore;
    }

    public void setBestScore(String bestScore) {
        this.bestScore = bestScore;
    }
}
